package com.longqin.wechat.service;

import com.longqin.wechat.entity.Template;
import com.longqin.wechat.entity.WxAccessToken;
import com.longqin.wechat.entity.WxUserInfo;

/**
 * @Description: 微信接口
 * 
 */
public interface WxService {
	
	/**获取openid
	 * @param code 
	 * @return
	 * @throws Exception
	 */
	public WxAccessToken getOpenId(String code)throws Exception;
	
	/**获取accessToken的一般接口
	 * @return
	 * @throws Exception
	 */
	public String getAccessToken() throws Exception;
	
	/**获取微信用户信息
	 * @param access_token
	 * @param openid
	 * @return
	 * @throws Exception
	 */
	public WxUserInfo getUserInfo(String access_token,String openid) throws Exception;
	
	/**发送模板消息
	 * @param template
	 * @throws Exception
	 */
	public boolean sendTemplate(Template template)  throws Exception;

}
